import service from "@/utils/request";

/**
 * 查询所有电厂
 */
export const getPlantList = () => {
  return service.post('stagePower/getPlantList')
}

/**
 * 添加机组信息
 */
export const addUnit = (data) => {
  return service.post('stagePower/addUnit', data)
}

/**
 * 查询全部机组
 */
export const getUnitList = (data) => {
  return service.post('stagePower/getUnitList', data)
}


/**
 * 查询全部机组
 */
export const deleteUnitList = (list) => {
  return service.post('stagePower/deleteUnitList', list)
}


/**
 * 修改机组是否有效
 */
export const toggleValid = (list) => {
  return service.post('stagePower/toggleValid', list);
}

/**
 * 修改机组信息
 */
export const updateUnit = (data) => {
  return service.post('stagePower/updateUnit', data);
}

/**
 * 导出机组信息
 */
export const exportToExcel = async (data) => {
  
  return service.post('stagePower/exportToExcel', data, {
    responseType: 'blob'
  });
}

